{% extends 'group_base.html' %}

{% block theme %}
{{ group.name }}群组新话题
{% endblock %}

{% block tbody %}

<form id="lzform" name="lzform" method="post" action="/group/new_topic/{{group.id}}/" enctype="multipart/form-data">
	<div style="display:none;">
		<input type="hidden" name="ck" value="V2yY">
	</div>
	<tr>
		<td class="pl2" align="center" width="75">标题: </td>
		<td>
			<input name="title" type="text" size="50" maxlength="100" value={{ title }}> 
			{% if error_title %}<span style="color:red">标题不能为空</span> {% endif %}
			{% if error_title_toolong %}<span style="color:red">标题不能长于40字符</span> {% endif %}
		</td>
		<!--
		{% if error_title %}
		<td style="color:red;">标题不能为空</td>
		{% endif %}
		-->
	</tr>
	
	{% if is_admin %}
	<tr>
		<td class="pl2" align="center" width="75">附件:</td>
		<!--<td><input type="file" name="file"/></td>-->
		<td>{{ form.myfile }}</td>
	</tr>
	{% endif %}
	
	<tr>
		<td align="center" valign="top">
			<div style="padding-top: 0;">
				<br>
				<br>
				{% if user.image %}
				<img src="/{{ user.image }}" alt={{ user.name }}>
				{% else %}
				<img src="/image/default_user.gif" alt={{ user.name }}>
				{% endif %}
			</div>
		</td>
		<td>
			{% include "wmd_css.html" %}
			{% include "wmd_js.html" %}
			<!--<textarea name="text" rows="20" cols="55"></textarea>-->
			<div id="wmd-button-bar" class="wmd-panel"></div>
			<div class="wmd-height-large"><textarea rows="10" cols="40" name="text" id="wmd-input" class="processed">{{ content }}</textarea></div>
			<div id="wmd-preview" class="wmd-panel"></div>
			<br/>
			<!--<div id="wmd-output" class="wmd-panel"></div><br>	-->
		</td>
		{% if error_text %}
		<td style="color: red;" align="center" valign="top"><br><br>内容不能为空</td>
		{% endif %}
	</tr>
	<tr>
		<td></td>
		<td>
			<input name="submit" type="submit" value="发言">
			&nbsp;&nbsp;&nbsp;
			<input name="cancel" type="submit" value="撤销">
		</td>
	</tr>	

{% endblock %}

{% block aside %}
<!--
<p>
	<a href="/group/gr/{{group.id}}/">
		<img src="/{{group.logo}}" alt={{group.name}}>
	</a>
</p>
-->
<p class="pl2">
	&gt;
	<a href="/group/gr/{{group.id}}/">返回&nbsp;{{group.name}}</a>
</p>

<h2>注意：</h2>
<div class="indent">
	<span class="pl">
		请您注意编辑器的使用规范，编辑器下方的区域可以预览您的编辑内容。
		<br>
	</span>
</div>

{% endblock %}